{% extends "_base.html" %}

{% block bodycontent %}
	{% if apis %}
        <table border="1">
            <tr>
                <td>Name</td>
                <td>Email</td>
                <td>ApiKey</td>
                <td>SecretKey</td>
                <td>Enabled</td>
                <td>Edit</td>
                <td>Delete</td>
            </tr>
            {% for api in apis %}
	            <tr>
	                <td>{{ api.name }}</td>
	                <td>{{ api.email }}</td>
	                <td>{{ api.api_key }}</td>
	                <td>{{ api.secret_key }}</td>
	                <td>
	                    <input type="checkbox" name="{{ api.api_key }}"
	                    {% if api.enabled %} checked{% endif %} disabled>
	                </td>
	                <td><a href="/api_key/edit?key={{ api.key }}">Edit</a></td>
	                <td><a href="/api_key/delete?key={{ api.key }}">Delete</a></td>
	            </tr>
            {% endfor %}
        </table>
	{% endif %}

{% endblock %}